// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

@use 'utils/mixins';

.hfroute-header {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 1520px;
    min-height: 100px;
    align-self: center;
    padding: 0 40px;

    .header-main {
        display: flex;
        width: 100%;
        height: 100%;
        flex-flow: wrap;
        align-items: center;
        justify-content: space-between;

        .header-logo-link {
            @include mixins.link;

            display: flex;
            color: rgba(var(--center-channel-color-rgb), 0.75);
            font-family: 'Metropolis';
            font-size: 20px;
            font-weight: 500;
            line-height: 28px;
            text-decoration: none;

            &:hover, &:active, &:visited, &:link {
                text-decoration: none;
            }

            &:focus {
                padding: 8px;
                border: 2px solid var(--sidebar-text-active-border);
                margin-left: -10px;
            }

            svg {
                width: 170px;
                fill: var(--center-channel-color);
            }

            .freeBadge {
                position: relative;
                top: 1px;
                display: flex;
                align-self: center;
                padding: 2px 6px;
                border-radius: var(--radius-s);
                margin-left: 12px;
                background: rgba(var(--center-channel-color-rgb), 0.08);
                color: rgba(var(--center-channel-color-rgb), 0.75);
                font-family: 'Open Sans', sans-serif;
                font-size: 10px;
                font-weight: 600;
                letter-spacing: 0.025em;
                line-height: 16px;
            }
        }
    }

    .header-back-button {
        position: absolute;
        top: unset;
        bottom: -8px;
        width: auto;
        padding: 0 0 0 40px;
        background: none;

        a {
            @include mixins.link;
        }
    }

    &.has-custom-site-name {
        .header-logo-link ~ .header-logo-link {
            margin-top: 12px;
        }
    }

    &.has-free-banner.has-custom-site-name {
        .header-back-button {
            bottom: -20px;
        }
    }
}

@media screen and (max-width: 699px) {
    .hfroute-header {
        padding: 0 24px;

        .header-main {
            .header-logo-link svg {
                width: 145px;
            }
        }

        .header-back-button {
            padding: 0 0 0 24px;
        }
    }
}
